CMAKE_MINIMUM_REQUIRED (VERSION 2.6.3)

PROJECT(something)

# This is the magic line needed for any KTH Robot Framework project
INCLUDE($ENV{ROBOT_FRAMEWORK_PROJECT_CMAKE})

ADD_SUBDIRECTORY(modules)

ADD_LIBRARY(robo_control robo_control.cpp)
ADD_LIBRARY(Sensors sensor_read.cc ir_manager.cc)
ADD_LIBRARY(Buttons buttons_reader.cc)

ADD_EXECUTABLE(robo_main robo_main.cc main_controller.cc)
TARGET_LINK_LIBRARIES(robo_main
    Mapping
    Vision
    Classifier
    Collector
    Util
    Buttons
    robo_control
    Sensors
    robot_framework)

ADD_EXECUTABLE(catch_ball catch_ball.cc ball_catcher.cc)
TARGET_LINK_LIBRARIES(catch_ball
    Vision
    Classifier
    Collector
    Util
    Buttons
    robo_control
    robot_framework)

ADD_EXECUTABLE(vision_test vision_test.cpp)

#   ...then we notify cmake that we are dependent on the modules
#   ...as well as the robot_framework
TARGET_LINK_LIBRARIES(vision_test
    Vision
    Classifier
    Util
    robot_framework)
